<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>通知</title>
</head>
<meta name="viewport"
	content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
<style type="text/css">
	* {
		margin: 0;
		padding: 0;
	}

	.title {
		display: inline-block;
		text-align: left;
		font-size: .9rem;
		line-Height: 1.2rem;
		/* width: 94%; */
		color: #252525;
		font-Family: "PingFang-SC-Medium";
		margin: .875rem .7rem .5rem .7rem;
	}

	.name-span {
	    display: block;
    font-size: .6rem;
    margin: 0 .6rem 1rem  .65rem;
    color: #ccc;
    height: .6rem;
    line-height: .6rem;
	}

	.name-span i {
		margin: 0 .55rem 0 0;
		font-style: normal;
	}
	
	.name-span i:nth-child(1) {
		color: #0099ff;

	}

	.name-span i:nth-child(4) {
		float: right;
		display: inline-block;
		width: .6rem;
		height: .45rem;
		background-image: url("./阅读次数@3x.png");
		background-position: center;
		background-repeat: no-repeat;
		background-size: contain;
		margin: 0 0 0 5.8rem;
		position: relative;
		top: 50%;
		transform: translate(0,-50%);
		
	}

	.name-span i:nth-child(3) {
		float: right;
		margin: 0 0 0 0.2rem;
	}

	/* .border {
		display: inline-block;
		height: 1px;
		width: 100%;
		background: #ccc;

	} */
	.news {
		display: none;
		font-size: .8rem;
		line-height: 1.2rem;
		color: #252525;
	}
	table,table tr th, table tr td { border:.05rem solid #ccc; }
	table { text-align: center; border-collapse: collapse; padding:.1rem;} 
	img{
		max-width: 100%;
	}
	video{
		background-color: #000;
		max-width: 100%;
	}
	.content {
		margin: 0 .9rem 0 .7rem;
	}

	.empty {
		display: none;
		margin: auto;
		width: 100%;
		/* height: 40rem; */
		text-align: center;
		margin-top: 15rem;


	}

	.empty i {

		display: inline-block;
		background-image: url(./cp_notdata@3x.png);
		background-position: center;
		background-repeat: no-repeat;
		background-size: contain;
		width: 10rem;
		height: 3.4rem;
	}

	.empty p:nth-child(2) {
		font-size:0.8rem;
	}

</style>

<body>
	<div class="empty"><i></i>
		<p>暂无数据</p>
	</div>
	<div class="news">
		<span class="title">2017新闻资讯新生入学报到注意事项</span>
		<span class="name-span"><i>教育政策</i><i>2019-12-11 21:51</i><i>1214</i><i></i></span>
		<!-- <p class="border"></p> -->
		<div class="content">
			<p>
				
			</p>
		</div>
	</div>
	<div>

	</div>

</body>

<script src="jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	(function (doc, win) {
		var docEl = doc.documentElement,
			resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
			recalc = function () {
				var clientWidth = docEl.clientWidth;
				if (!clientWidth) return;
				docEl.style.fontSize = 20 * (clientWidth / 375) + 'px'; //在320px的屏幕上，1rem=20px
			};
		if (!doc.addEventListener) return;
		win.addEventListener(resizeEvt, recalc, false);
		doc.addEventListener('DOMContentLoaded', recalc, false);
	})(document, window);

	function getQueryVariable(variable) {
		var query = window.location.search.substring(1);
		var vars = query.split("&");
		for (var i = 0; i < vars.length; i++) {
			var pair = vars[i].split("=");
			if (pair[0] == variable) {
				return pair[1];
			}
		}
		return (false);
	}

	function ajaxN(url, submitType, param, successFunction) {

		// if (param.URL == summaryURL) {
		// 	param.Token = '73fd7fef550517630996697579bb8828';
		// 	param.SchoolID = 's14-129-8f41';
		// 	param.SubjectID = 'S1-English';
		// 	param.TeacherGH = 'bktea1';
		// }
		$.ajax({
			url: url,
			type: submitType,
			timeout: 60000,
			dataType: "json",
			data: param,

			success: function (data) {
				successFunction(data);
			},
			error: function (data) {
				$('.news').hide();
				$('.empty').show();
				// assistantTipsFn('请求错误~');
				// $('.assistant-popup-loading').hide();

				// if ($('.assistant-active').attr('name') == 1) {
				// 	$('.infoCenter-empty').show();
				// 	$('.infoCenter-empty-text').text($('.info-active').eq(1).text());
				// }
				// if ($('.assistant-active').attr('name') == 1 && $('.info-active').eq(0).attr('name') == 2) {
				// 	assistantTipsFn('数据加载失败~');
				// }
				// if ($('.assistant-active').attr('name') == 2) {
				// 	$('.personal-schedule-box').hide();
				// 	$('.personal-schedule-empty').show();
				// }
			},
			complete: function (XMLHttpRequest, status) {
				if (status == 'timeout') {
					XMLHttpRequest.abort(); // 超时后中断请求
					$('.news').hide();
				$('.empty').show();
					// $('.assistant-popup-loading').hide();
					// assistantRemindFn(['网络超时，请刷新'], function() {
					// 	ajaxN(url, submitType, param, successFunction);
					// })
				}
			}
		})
	};
	var sendData = {
		NewsID: getQueryVariable('NewsID'),
		UserID: getQueryVariable('UserID'),
		Sign:'0',
	};
	var url = getQueryVariable('url');
	// ajaxN(url + '/PublicInfo/Notice/ReceiveNotice/GetNoticeContent', 'get', sendData, function (data) {
	// 	if (data.StatusCode == 200 && data.Data.BackCode == 1) {
	// 		$('.name-span').html(data.Data.Item.NoticeMain[0].PublisherName);
	// 		$('.date-span').html(data.Data.Item.NoticeMain[0].EffectTime.slice(0, 16));
	// 		$('.title').html(data.Data.Item.NoticeMain[0].NoticeTitle);
	// 		$('.content').html(data.Data.Item.NoticeMain[0].NoticeContent);
	// 		$('.notice').show();
	// 	} else {
	// 		$('.empty').show();
	// 	}
	// }, function (error) {
	// 	$('.empty').show();
	// });
	ajaxN(url + '/News/ReceiveNewsMgr/GetReceiveNewsContent', 'get', sendData, function (data) {
		if (data.StatusCode == 200 && data.Data.BackCode == 1) {
			$('.name-span i').eq(0).html(data.Data.NewsInfo.NewsTypeName);
			$('.name-span i').eq(1).html(data.Data.NewsInfo.PublishTime);
			$('.name-span i').eq(2).html(data.Data.NewsInfo.ReadCount);
			$('.title').html(data.Data.NewsInfo.NewsTitle);
			$('.content').html(data.Data.NewsInfo.NewsContent);
			$('.news').show();
			$('.empty').hide();
			$('video').css('max-width','100%');
			// $('source').css('max-width','100%');
			// $('video').css('max-width', '100%');
			// $('video').attr('preload', 'meta');
			$('video').attr('preload','auto');
			// $('video').attr('id', 'video');
			// $('video').attr('poster',$('video').attr('src') + '?vframe/jpg/offset/1');
			
			// $('.content').append($('<div id="output"></div>  '));
			// if ($('.musicPlayer') && $('.musicPlayer').length > 0) {
			// 	$('.musicPlayer').children('#musics').attr('width', 0);
			// 	for (var i = 0; i < $('.musicPlayer').length; i++) {
			// 		var id = "audio" + i;
			// 		var srcArr = $('.musicPlayer').eq(i).children('#musics').attr('src').split('&');
			// 		var src = '';
			// 		srcArr.map(function (item) {
			// 			if (item.indexOf('file=') > -1) {
			// 				src = item.split('=')[1];
			// 			}
			// 		})
			// 		var txt2 = $('<audio id=' + id + '  controls="controls" loop="loop" type="audio/mp3"  src=' +
			// 			src + '  type="audio/mp3" /></audio> ');
			// 		$('.musicPlayer').eq(i).prepend(txt2);
			// 		// audioAutoPlay(id);
			// 	}
				
			// }
		}else{
			$('.news').hide();
			$('.empty').show();
		}
		$('img').click(function(){
		
		var imgUrl =$(this).attr('src');
		var imgUrlAll='';
		for(var i=0;i<$('img').length;i++){
			imgUrlAll+=$('img').eq(i).attr('src')+',';
		}
		imgUrlAll=imgUrlAll.slice(0,-1);
		// $('.content').append('<button>点击了~</button>');
		window.webkit.messageHandlers.openvc.postMessage({"imgUrl":imgUrl,"imgUrlAll":imgUrlAll});
	})
	}, function (error) {
		$('.empty').show();
		('.news').hide();
	});
</script>

</html>